package com.stars.module.user.service;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.stars.base.entity.CommonDTO;
import com.stars.base.entity.Result;
import com.stars.module.user.entity.StarOrgUser;
import com.stars.module.user.entity.StarUser;

public interface StarUserService {
    JSONObject loadUserByDeptId(CommonDTO dto);

    JSONObject loadUserByRoleId(CommonDTO dto);

    StarUser loadUserById(String uid);

    boolean saveOrUpdateUser(StarUser user);

    Integer getMaxIndex(String fid);

    boolean removeUser(String uid,String deptId);

    /**
     * 保存关系用户
     * @param starOrgUser 用户部门关联关系
     * @return boolean
     */
    boolean saveOrgUser(StarOrgUser starOrgUser);

    /**
     * 设置兼职部门
     * @param uid
     * @param deptIds
     * @return
     */
    Result putPartTimeDept(String uid, String deptIds, Integer isMain);

    JSONObject loadUserPartTimeDept(CommonDTO dto);
}
